package roby.publicEncryption;

public class PublicEncryptor {

	private int r;
	private int generator;
	private int secretKey;
	private PublicKey key;
	public PublicEncryptor(){
		CyclicGroup.prepareGenerators();
		this.r = (int) (Math.random() * CyclicGroup.getPrimeNumber());
		this.generator = CyclicGroup.getGenerator();
		this.secretKey = (int) (Math.random() * CyclicGroup.getPrimeNumber());
		key = new PublicKey();
		key.setG(generator);
		key.setY((int) Math.pow(generator, secretKey));
	}
	
	
}
